LanguageExt.Core

LanguageExt.Core TypeClasses BiFunctor

Contents

interface BiFunctor <FAB, FR, A, B, R> Source #

Functor type-class

interface BiFunctor <FAB, FUV, A, B, U, V> Source #

Functor type-class

class TypeClass Source #

Methods

method FR bimap <BiFunctorAB, FAB, FR, A, B, R> (FAB ma, Func<A, R> fa, Func<B, R> fb) Source #

where BiFunctorAB : BiFunctor<FAB, FR, A, B, R>

Projection from one bi-functor to another. This operation should map only one of the items (A, or B). The type R should match A, or B depending on which item is being mapped.

Parameters

type BiFunctorAB

struct type derived from BiFunctor

type FAB

Source functor value type

type FR

Target functor value type

type A

Source item 1 value type

type B

Source item 2 value type

type R

Target item value type

param ma

Functor value to map from

param fa

Projection function

param fb

Projection function

returns

Mapped functor

method FUV bimap <BiFunctorAB, FAB, FUV, A, B, U, V> (FAB ma, Func<A, U> fa, Func<B, V> fb) Source #

where BiFunctorAB : BiFunctor<FAB, FUV, A, B, U, V>

Projection from one value to another. Both elements of the bi-functor can will be mapped to a new result value.

Parameters

type FAB

Source functor value type

type FUV

Target functor value type

type A

Source item 1 value type

type B

Source item 2 value type

type U

Target item 1 value type

type V

Target item 2 value type

param ma

Functor value to map from

param fa

Projection function

param fb

Projection function

returns

Mapped functor